home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1998 October / Macworld (1998-10).dmg / Shareware World / Info / For Developers / MacZoop 1.8.4 / More Classes / Window Classes / ZPictWindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-05-06  |  1.3 KB  |  73 lines  |  [TEXT/CWIE]

  1. /*************************************************************************************************
  2. *
  3. *
  4. *            MacZoop - "the framework for the rest of us"         
  5. *
  6. *
  7. *
  8. *            ZPictWindow.h        -- a window that displays PICT files
  9. *
  10. *
  11. *
  12. *
  13. *
  14. *            © 1996, Graham Cox
  15. *
  16. *
  17. *
  18. *
  19. *************************************************************************************************/
  20.  
  21.  
  22. #pragma once
  23.  
  24. #ifndef __ZPICTWINDOW__
  25. #define __ZPICTWINDOW__
  26.  
  27. #ifndef __ZSCROLLER__
  28. #include    "ZScroller.h"
  29. #endif
  30.  
  31.  
  32. // set up streaming stuff:
  33.  
  34. DEFINECLASSID( ZPictWindow, 'zpcw' );
  35.  
  36. // class def:
  37.  
  38. class    ZPictWindow : public ZScroller
  39. {
  40. protected:
  41.     Boolean        savePreview;
  42.     Boolean        saveCustomIcon;
  43.     PicHandle    thePicture;
  44.     
  45. public:
  46.  
  47.     ZPictWindow( ZCommander* aBoss, const short windID );
  48.     ZPictWindow();
  49.     virtual ~ZPictWindow();
  50.     
  51.     virtual void    DrawContent();
  52.     virtual void    OpenFile( const OSType fType, Boolean isStationery = FALSE );
  53.     virtual void    SaveFile();
  54.     virtual void    UpdateMenus();
  55.     
  56.     virtual Boolean    CanPasteType();
  57.     virtual void    DoCopy();
  58.     virtual void    DoPaste();
  59.     
  60.     virtual void    SetPictureFromResource( short pictResID );
  61.     
  62.     inline    void    SetSavePreview( Boolean saveIt ) { savePreview = saveIt; };
  63.     inline    void    SetSaveCustomIcons( Boolean saveIt ) { saveCustomIcon = saveIt; };
  64.  
  65. // streaming
  66.     virtual void    WriteToStream( ZStream* aStream );
  67.     virtual void    ReadFromStream( ZStream* aStream );
  68. };
  69.  
  70.  
  71.  
  72.  
  73. #endif